package com.nacos.demo;

import com.nacos.demo.property.CustomProperties;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;

/**
 * @author H
 * @date 2023/2/8
 */
@EnableConfigurationProperties({
        CustomProperties.class
})
// 如果将autoRegister设置为false，则只订阅不注册服务
// @EnableDiscoveryClient(autoRegister = false)
@EnableDiscoveryClient
@SpringBootApplication
public class NacosApplication {
    public static void main(String[] args) throws InterruptedException {
        SpringApplication.run(NacosApplication.class, args);
    }
}
